#coding=utf-8
import pytest
import os
@pytest.fixture() #这是一个修饰符,修饰符所对应的函数可以被引用
def test1():
    print("\n---------test1---------")
    
@pytest.fixture()
def test2():
    print("\n---------test2---------")
    
def test3():
    print("\n---------test3---------")
    
def test4(test1,test2):#此处调用了test1,test2,会先执行test1,test2,然后再是test4
    print("\n---------test4--------")

if __name__=="__main__":
    file_path=os.path.dirname(__file__) + "\\fixture间调用.py"
    print("file path is %s" % file_path)
    pytest.main(["-vs",file_path])
